package com.fwj.gmall.product.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fwj.gmall.model.product.BaseTrademark;
import com.fwj.gmall.product.service.TrademarkService;
import com.fwj.gmall.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/product/")
public class TrademarkController {

    @Autowired
    private TrademarkService trademarkService;

    @ApiOperation("获取品牌分页列表")
    @GetMapping("baseTrademark/{page}/{limit}")
    public Result baseTrademark(@PathVariable("page") Long page, @PathVariable("limit") Long limit) {
        IPage<BaseTrademark> baseTrademarkList = trademarkService.baseTrademark(page, limit);
        return Result.ok(baseTrademarkList);
    }
}
